//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Collections.Generic;
using System.Text;


namespace Eas.WebCrawler.Interfaces {
    /// <summary>Extracts links from a processed page.</summary>
    /// <remarks>The <see cref="WebCrawlerEngine"/> calls into this class when it encounters new links to determine if those links (a.k.a. <see cref="Uri"/>s) should also be processed.</remarks>
    public interface LinkExtractor : Eas.WebCrawler.Interfaces.WebCrawlerComponent{
        /// <summary>Parses a returned web page and returns any links found there.</summary>
        /// <param name="processingState">The details of the current request.</param>
        /// <param name="reader">The reader containing the body of the request.</param>
        /// <returns>An enumeration of <see cref="Uri"/>s found in the body of the web response.</returns>
        IEnumerable<Uri> GetLinks(ProcessingState processingState, System.IO.TextReader reader);
    }
}
